<?php
/**
 * Compound {@link Element pOHA object}s. These objects are made up
 * from a combination of base and compound pOHA objects aswell as other
 * extended pOHA objects.
 *
 * @version		1.0
 * @author 		Bernard Leckning <bernard@dorja.com>
 * @package		pOHA
 * @subpackage	Extended
 */


/**
 * Compound pOHA {@link pOHACompound.php Compound} subpackage.
 */
include_once('pOHACompound.php');


/**
 * An extended {@link Element pOHA object}.
 *
 * This class renders ordered or unordered HTML lists.
 *
 * @version		1.0
 * @author 		Alexander R B Whillas BSCS <dev@tsd.net.au>
 * @package 	pOHA
 * @subpackage	Extended
 */
class HTMLInputDateSelect extends HTMLBlock
{
	var $_day;
	var $_month;
	var $_year;
	
	function HTMLInputDateSelect(	$name,
									$day,
									$month,
									$year,
									$class = '',
									$id = ''
								)
	{
		$this->_day = $day;
		$this->_month = $month;
		$this->_year = $year;
		
		$months = array	(	01 => 'January',
							02 => 'February',
							03 => 'March',
							04 => 'April',
							05 => 'May',
							06 => 'June',
							07 => 'July',
							08 => 'August',
							09 => 'September',
							10 => 'October',
							11 => 'November',
							12 => 'December'
						);
		
		for($i = 1; $i < 31; $i++)
			$days[$i] = $i;
		
		$d = new HTMLSelectInput($name.'_day', $days, $this->_day, 'day');
		$m = new HTMLSelectInput($name.'_month', $months, $this->_month, 'month');
		$y = new HTMLTextInput($name.'_year', $this->_year, 'year');
		
		parent::HTMLBlock(array($d, $m, $y), $class, $id, TRUE);
	}
}

?>